package com.nuanshui.heatedloan.credit.pay;

//http://113.108.182.3:8282/techsp/helper/filedetail/tlt/filedetail294.html
public class TransRequestCode {

    //批量代收
    public static final String TRX_CODE_BATCH_REPAY="100001";

    //批量代付
    public static final String TRX_CODE_BATCH_PAY="100002";

    //100011是实时代笔代收交易代码
    public static final String TRX_CODE_REPAY="100011";

    //100014是实时单笔代付交易代码
    public static final String TRX_CODE_SINGLE_PAY="100014";

    //200004 交易结果查询请求
    public static final String TRX_CODE_TRADE_QUERY="200004";

    //200005 交易明细查询请求(完成的交易)
    public static final String TRX_CODE_TRADE_COMPLETED_QUERY="200005";

    //bin查询,银行账号的基本属性查询
    public static final String TRX_CODE_BANKCARD_QUERY="200007";

    //身份证查询
    public static final String TRX_CODE_IDCARD_QUERY="220001";


    //211002是验证结果查询代码
    public static final String TRX_CODE_UESRACCOUNT_QUERY="211002";

    //211004是账户实名验证(二/三/四要素)代码
    public static final String TRX_CODE_USERACCOUNT_AUTH ="211004";

    //211006 实名付申请
    public static final String TRX_CODE_USERACCOUNT_AUTH_APPLY ="211006";

    //211006R 实名付短信重发
    public static final String TRX_CODE_USERACCOUNT_AUTH_RESEND ="211006R";

    //211006C 实名付确认
    public static final String TRX_CODE_USERACCOUNT_AUTH_VERIFY="211006C";

    //211007是账户实名验证(四要素+短信)代码
    public static final String TRX_CODE_USERACCOUNT_AUTH_SMS_APPLY ="211007";

    //211007R 是账户实名验证(四要素+短信) 短信重发
    public static final String TRX_CODE_USERACCOUNT_AUTH_SMS_RESEND ="211007R";

    //211007C 是账户实名验证(四要素+短信) 短信确认
    public static final String TRX_CODE_USERACCOUNT_AUTH_SMS_VERIFY="211007C";

    //300000是账号信息查询代码
    public static final String TRX_CODE_QUERY_ACCOUNT="300000";


    public static boolean isPayCode(String code)
    {
        return (TRX_CODE_REPAY.equals(code) || TRX_CODE_SINGLE_PAY.equals(code));
    }

    public static String getBatchPayCode(String code) {
        String batchCode = null;
        if (code.equals(TRX_CODE_SINGLE_PAY)) {
            batchCode = TRX_CODE_BATCH_PAY;
        } else if (code.equals(TRX_CODE_REPAY)) {
            batchCode = TRX_CODE_BATCH_REPAY;
        }
        return batchCode;
    }
}
